/*
 Copyright To change this template, choose Tools | Templates
 Copyright and open the template in the editor.
 */

package com.click.app.service.impl;

import com.click.app.dao.RequestClientDao;
import com.click.app.model.Product;
import com.click.app.model.RequestClient;
import com.click.app.service.RequestClientManager;
import java.util.Date;
import java.util.List;



/**
 * @author Joel Chuca Condo
 * @date 04/05/2009
 */
public class RequestClientManagerImpl extends GenericManagerImpl<RequestClient, Long> implements RequestClientManager {

    private RequestClientDao requestClientDao;

    public RequestClientManagerImpl(RequestClientDao requestClientDao){
        super(requestClientDao);
        this.requestClientDao = requestClientDao;
    }

    public List<RequestClient> findByProduct(Product product) {
        return requestClientDao.findByProduct(product);
    }

    public List<RequestClient> findByProduct(Long id) {
        return requestClientDao.findByProduct(id);
    }

    public List<RequestClient> findByProductPeriod(Product product, Date initDate, Date endDate) {
        return requestClientDao.findByProductPeriod(product, initDate, endDate);
    }

    public List<RequestClient> findByProductPeriod(Long id, Date initDate, Date endDate) {
        return requestClientDao.findByProductPeriod(id, initDate, endDate);
    }

    public List<Product> findAllNoPackageDetail(){
        return requestClientDao.findByProductPeriod();
    }
    public List<RequestClient> findByProductStockNoCero(Long id){
        return requestClientDao.findByProductStockNoCero(id);
    }
}
